package com.dy.placeOrder.zhifubao;

import java.io.FileWriter;
import java.io.IOException;

public class AppUtil {
    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
    public static String app_id = "9021000142607449";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key="MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC1PkKfm4NhyB/kX0zf3jPZ8" +
            "HnGd/KAiSj9le3C7oZ4dBX9cSJJcipY3B4T+Q08XWo1hWYY0g4v99b8Os3naFVHNBE+cICURtUTCzKZhRO4SVkx7TvxvToKIILSWzaVte" +
            "EAlG9ihcIqX9D6JGjW/PK3o43KWNsPG7beERNLAHQJAEAwoQNq6N8I7brriF6aXiSvMrRJJRYZKT8uJgNQ8XFln5sSSS1/IvPL9Rum4Nrm" +
            "Hum0aSrtlBBFnEldlveV8xq1CxITQB/ciSrN7b73Y4ijBOJajUVeX6ll0H3kLJk0o/1Ycfnz3XZoNw8NxsB9gm+AD4Rh4o/uV19feE32" +
            "jRK3AgMBAAECggEBAJzNN6CUT486L3VJid2ohN2JciFlxpSzlZYGr0PVTttJO3kf9tTqA38LOK546p2OCAQz3AefO4z+c62WRmts1VKb1k" +
            "tZ07P0sAUgy+8Ltera8mMCZrkWx+7Y/7V0Gn5dc0MoKFFpfXlhmg+/jkBpaKe9xT8JrsOca5Il3bYmtzzM2BYOHWBAC30eIji0oJlCrzo" +
            "u3Ut6JrmUIG4xdeHonAppuP7H35VddKxv7/kji13iYFaH7EXJbREaDC58rlawsMuKJT9WnSbRFjqIvDk8GkhNddLqq4YY1qzkIYUglUrd7" +
            "EvzOUH3qdlY32pBayaZpjznXxMYNHdINbWx5ViOL2kCgYEA5zKmrNEgDo8yvaPlmVibzuZjT6ybYoQ+kEq7kIqQKX4nlr8uOswzvh9fXSh" +
            "8uWXJ+Yoj8u4FyA9xFTho+LTvybFME0DtwprE6toLlmrRZQJUo5TxsKMSCK/WNMC94NwqMQRs0RSzvHtRrJxJD4DpNrZkyx3V23PCwWhbX4" +
            "kNCWMCgYEAyK+2dhZRNPCKrTStfzlflEqpxEsWqT0ocLSRY/a9G84tLFk0qgu+5MqqhUdE0Qpxx4enh+FVUOs1g8w1+FNvChKjFY2CF0RP4" +
            "NAUPsNtcDcKnkgx5Q0h+0sdqM/EjLk1zzo6S+0GTUZQUg/jstHa8aVTrFiZ2RymhPPE5XVxu50CgYAPYYdFKASB83TkuOqlcQeslBc3Tbxo" +
            "qXOgFdi0nQNKP2JS3RUuRDeNBnlJsU/a5bKyL0aE+uDXlm9nggE5yo/JU0pEXaVztOg015y9vQ2BMs5+s4IAxliEy23sxIXdV8hWynySzFX" +
            "IzEt6uEsEBQd+5FOAT9PSbbkfNNofWPbNEQKBgG3U1Hv+LMVXW939NXKqWKfU0OJv4eAPa4F7IRLfZ5G/HbPmwk7KDNg0HmzAm2X4XFrB4C" +
            "saZFHb2DbgXS0hpGST3JMgFfFb3od/+YR7+fnu9a24fy4HKPDZpErOIpiNiGh4So1hFBDYiX7P2WL1POkA/TEWcGSFLJEYxEp8Ixl1AoGBA" +
            "KJdRUGyxrwXOzIKND9NvC80vtOQYqM/qo54Cd3Qrd0X44tqdvsOX6sNQhRjVZO+3LoSFBWXwfOXyD8M7qogCSZjjuJl5AedIQ5dbNI9Iu3z" +
            "mfxUQuHF+UPGkLhTu3b0Z6FpDaw6W9Alxl7bwU0ytk4aHhMCzj0ud9p6WN/hOInw";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtT5Cn5uDYcgf5F9M394z2fB5xnfygI" +
            "ko/ZXtwu6GeHQV/XEiSXIqWNweE/kNPF1qNYVmGNIOL/fW/DrN52hVRzQRPnCAlEbVEwsymYUTuElZMe078b06CiCC0ls2lbXhAJRvYoXCK" +
            "l/Q+iRo1vzyt6ONyljbDxu23hETSwB0CQBAMKEDaujfCO2664heml4krzK0SSUWGSk/LiYDUPFxZZ+bEkktfyLzy/UbpuDa5h7ptGkq7ZQ" +
            "QRZxJXZb3lfMatQsSE0Af3Ikqze2+92OIowTiWo1FXl+pZdB95CyZNKP9WHH58912aDcPDcbAfYJvgA+EYeKP7ldfX3hN9o0StwIDAQAB";

    // 服务器异步通知页面路径
    //需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String notify_url = "http://rg74vq.natappfree.cc/getnotify";

    // 页面跳转同步通知页面路径
    //需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
    public static String return_url = "http://rg74vq.natappfree.cc/getreturn";

    // 签名方式
    public static String sign_type = "RSA2";

    // 字符编码格式
    public static String charset = "utf-8";

    // 支付宝网关,注意这些使用的是沙箱的支付宝网关，与正常网关的区别是多了dev
    public static String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";

    // 支付宝网关
    public static String log_path = "D:\\zhifubao";


//↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    /**
     * 写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord 要写入日志里的文本内容
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}
